Automated merger of logically associated messages in a message queue

ABSTRACT

Embodiments of the invention provide a method, system and computer program product for message merging in a messaging queue. In an embodiment of the invention, a method for message merging in a messaging queue can be provided. The method can include receiving a request to add a new message to a message queue in a message queue manager executing in memory by a processor of a host computing platform. The method can also include a merge indicator to stipulate whether or not a merge should take place. The method also can include identifying an association key associating the new message with an existing message in the message queue and locating an associated message in the message queue corresponding to the identified association key. Finally, the method can include merging the new message with the located associated message in the message queue.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the field of message queue managementand more particularly to the programmatic association of logicallyassociated messages in a message queue.

2. Description of the Related Art

In the field of information technology, a message queue is asoftware-engineering component used for inter-process communications orinter-thread communications. The component employs a queue into whichmessages can be placed by a messenger and from which messages can beretrieved by a designated recipient. In this regard, the message queuecan be a communicative component enabling asynchronous messaging asbetween the messenger and the designated recipient. Operationally, themessage queue can support multiple messengers and recipients such thatasynchronous communications can be achieved for a group of participants.

The asynchronous nature of the message queue provides for an idealtechnology coupler for disparate technologies. Specifically, so long asseparate technologies can access the message queue, the separate anddisparate technologies can engage in message passing thereby enablingcommunications. In particular, the message queue can expose differentmethod calls through an application programming interface (API) foropening, writing to, reading from, and closing the message queue. Eachapplication in turn can include logic to invoke a sequence of the methodcalls in order to either place a message into the message queue, or toretrieve a message from the message queue. Specifically, in operation,upon request, the API can search a message queue for an availablemessage and can return the same to the requesting logic.

Generally, messages are placed on message queues by one or moreapplications for the purpose of being processed by other applications.Messages can be processed as the messages arrive on a message queue, ormessages can accumulate to be processed at a later time. In the lattercircumstance, accumulated messages can be logically associated whereappropriate. For example, messages pertaining to the same subject mattercan be logically associated by the common subject matter such asmessages pertaining to financial operations on the same account, ormessages pertaining to contact management operations for the sameperson.

Typically, when logically associated messages in a message queue areprocessed by an application, each message in the message queue isprocessed independently of other messages in the message queue. In thisregard, to the extent each message in the message queue pertains to atransaction to be performed by the application, each transaction isperformed responsive to the retrieval of a corresponding message fromthe message queue irrespective of any other transaction corresponding toany other message remaining in the message queue. Alternatively, anapplication can pre-process all messages in the message queue toidentify logically associated messages, and can perform a merge of theidentified logically associated messages prior to processing the mergedmessages.

Notwithstanding, the skilled artisan will recognize that it remains theresponsibility of the application either to process the messages in themessage queue individually, even when the messages are logicallyassociated, or to perform a merge of logically associated messages toresolve logical associations prior to processing the merged messages. Ineither circumstance, additional computer processing will be requiredadding complexity and processing time to application programs.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention address deficiencies of the art inrespect to message queue management and provide a novel and non-obviousmethod, system and computer program product for message merging in amessaging queue. In an embodiment of the invention, a method for messagemerging in a messaging queue can be provided. The method can includereceiving a request to add a new message to a message queue in a messagequeue manager executing in memory by a processor of a host computingplatform. The method also can include identifying an association keyassociating the new message with an existing message in the messagequeue and locating an associated message in the message queuecorresponding to the identified association key. Finally, the method caninclude merging the new message with the located associated message inthe message queue.

In another embodiment of the invention, a message queueing dataprocessing system can be provided. The system can include a hostcomputing platform including memory and at least one processor. Thesystem further can include a message queue coupled to the host computingplatform and a message queue manager coupled to the message queue andexecuting by the processor in the memory of the host computing platform.The system yet further can include a message merge module coupled to themessage queue manager. The module can include program code enabled uponexecution while in memory by a processor of a computer to identify in arequest to add a new message to the message queue received by themessage queue manager, an association key associating the new messagewith an existing message in the message queue, to locate an associatedmessage in the message queue corresponding to the identified associationkey, and to merge the new message with the located associated message inthe message queue.

Additional aspects of the invention will be set forth in part in thedescription which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The aspectsof the invention will be realized and attained by means of the elementsand combinations particularly pointed out in the appended claims. It isto be understood that both the foregoing general description and thefollowing detailed description are exemplary and explanatory only andare not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute partof this specification, illustrate embodiments of the invention andtogether with the description, serve to explain the principles of theinvention. The embodiments illustrated herein are presently preferred,it being understood, however, that the invention is not limited to theprecise arrangements and instrumentalities shown, wherein:

FIG. 1 is a pictorial illustration of a process for logically mergingqueued messages in a message queue;

FIG. 2 is a schematic illustration of a message queuing data processingsystem configured for logically merging queued messages in a messagequeue; and,

FIG. 3 is a flow chart illustrating a process for logically mergingqueued messages in a message queue.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention provide for a method, system and computerprogram product for the automated merging of logically associatedmessages. In an embodiment of the invention, messages can be receivedfor placement in a message queue. An indication of whether or not tomerge a received message can be determined, for instance by reference toa parameter included with a directive to place the message onto themessage queue, by way of an environment variable, with reference to datain a message header for the message, or data embedded within the messageitself. If it is determined to merge the received message, anassociation key for associating the received message with anothermessage in the message queue can be used to establish an associationbetween the two messages using data in the message headers and/or themessage data. In this way, the number of messages in the message queuecan be reduced through merging associated messages.

In further illustration, FIG. 1 pictorially depicts a process forlogically merging queued messages in a message queue. As shown in FIG.1, one or more applications 110 can utilize a message queue 120 forexchanging application messages 140A in the message queue 120. A queuemanager 130 can manage the posting of messages 140A by the applications110 onto the message queue 120 and the removing of messages 140A by theapplications 110 from the message queue 120 for processing in theapplications 110. Of note, as a given one of the applications 110requests addition of a message 140B onto the message queue 120 by thequeue manager 130, the queue manager 130 can determine whether or notthe message 140B is to be merged with another associated one of themessages 140A already resident in the message queue 120. If so, thequeue manager 130 both can identify a particular one of the messages140A in the message queue 120 associated with the message 140A and alsothe queue manager 130 can perform a merger of the message 140B with theassociated one of the messages 140A based upon a selected one of mergerrules 150.

Once the selected one of the merger rules 150 has been applied, thecontent of the message 140B can be merged with the associated one of themessages 140A in the message queue and the message 140B otherwise can bediscarded. Alternatively, the content of the associated one of themessages 140A can be merged with the message 140B and the associated oneof the messages 140A can be removed from the message queue 120 anddiscarded. As yet another alternative, the content of the message 140Band the content of the associated one of the messages 140A in themessage queue can be combined into a new message and placed into themessage queue 120. In any event, the merger of the message 140B with theassociated one of the messages 140A in the message queue 120 can beperformed by the queue manager 130 without unnecessarily burdening theapplications 110.

The process described in connection with FIG. 1 can be implemented in amessage queuing data processing system. In yet further illustration,FIG. 2 is a schematic illustration of a message queuing data processingsystem configured for logically merging queued messages in a messagequeue. The system can include one or more servers 210, each includingone or more processors, memory and an operating system, each of theservers 210 hosting the execution of one or more applications 220. Oneor more of the applications 220 can be accessed through end user clientcomputing devices 230 over computer communications network 240. Further,individual ones of the servers 210 can be communicatively coupled to oneanother over the computer communications network 240.

A host computing platform 250 with memory and at least one processoralso can be communicatively coupled to the servers 210 over the computercommunications network 240. The host computing platform 250 can supportthe operation of a message queue 260 managed by message queue manager280. In this regard, the message queue manager 280 can be a computerprogram executing in the memory by one or more of the processors of thehost computing platform 250 and managing access to messages 270 in themessage queue 260 by different ones of the applications 220 from overthe computer communications network 240. Further, each of the messages270 in the message queue 260 can include content expressed in a body ofthe message as well as a header portion, as it is well known in the art,for use by the message queue manager 280 in determining how to process acorresponding one of the messages 270 with respect to the message queue260.

A message merge module 290 can be coupled to the message queue manager280 or be a component of the message queue manager 280. The messagemerge module 290 can include program code that when executed by aprocessor while loaded into memory of a computer can manage the logicalmerger of selected ones of the messages 270 in the message queue 260. Inthis regard, the message merge module 290 can execute as program code inthe memory of the host computing platform 250 or within the memory of adifferent computing platform communicatively coupled to the hostcomputing platform 250 directly or from over the computer communicationsnetwork 240.

The program code of the message merge module 290 when executed by aprocessor in memory of a computer can identify requests by theapplications 220 to place messages into the message queue 260. For eachof the requests, the program code can determine whether or not a logicalmerger is preferred for a message with respect to an existing one of themessages 270 in the message queue 260. This determination can be basedupon data stored in the header of the message, in the body of themessage, or in a parameter stored for the message queue 260, itself, ordata passed as a parameter by the application program interface, or datathat is available as an environment variable accessible by the messagemerge module 290. For each request corresponding to a message to belogically merged with respect to an existing one of the messages 270 inthe message queue 260, the program code can locate the existing one ofthe messages 270 in the message queue 260 and can apply a merge rule forthe located existing one of the messages 270 and the correspondingmessage in the request. Finally, the program code can store each mergedmessage in the message queue 260.

In even yet further illustration of the operation of the message mergemodule 290, FIG. 3 is a flow chart illustrating a process for logicallymerging queued messages in a message queue. Beginning in block 305, anapplication put request can be received for a message that can includeboth a message body and a message header. The request further caninclude one or more parameters, such as an indication of whether themessage is to be logically merged with an existing message in themessage queue, and if so, an association key corresponding to theexisting message. In alternative aspects of the embodiment, however, theparameters can be provided as part of the message header, as part of thecontent of the message body, as attributes of the message queue, asenvironment variables, as content of a queue message, or as content in afile or database.

In block 310, the merge indicator, if any, can be loaded for themessage. In decision block 315, it can be determined whether or not alogical merge is preferred for the message. To the extent that a logicalmerge is not preferred for the message, in block 360 the message can bestored in the message queue and the process can end in block 365.Otherwise, if a logical merge is preferred as determined in decisionblock 315, in block 320 an association key can be loaded for the messageand an associated message in the message queue can be located with theassociation key in block 325. The association key can be a parameter orparameters of the initial request, as part of the message header, aspart of the content of the message body, as attributes of the messagequeue, as environment variables, as content of a queue message, ascontent in a file or database, as a queue manager attribute, as part ofa queue message. In decision block 330 it can be determined if noassociated message can be located in the message queue for theassociation key. If not, in block 360 the message can be stored in themessage queue and the process can end in block 365. Otherwise, theprocess can continue through block 335.

In block 335, a merge rule can be loaded for merging the message withthe located associated message in the message queue. The merge rule caninclude a description of relevant data in each message and how therelevant data is to be combined in a single message. For example, themerge rule can provide a markup language mapping of data in each messageto one another and a directive to merge the data into a position in themerged message. As another example, the merge rule can be an executablescript or program to perform the physical merger of the data of bothmessages into a single message. Optionally, the merge rule can bespecified on a message by message basis, or the message merge module canbe configured to use a particular merge rule. As another option, themerge rule can specify whether or not the message is to replace thelocated associated message in the queue in a modified form resultingfrom a merger of both messages, or whether or not the located associatedmessage is to be updated in a modified form resulting from a merger ofboth messages.

In block 340, the messages can be merged according to the merge rule andin decision block 345, it can be determined whether or not the messageis to replace the located associated message in the queue in a modifiedform resulting from a merger of both messages, or whether or not thelocated associated message is to be updated in a modified form resultingfrom a merger of both messages. If the former, in block 355 the locatedassociated message can be removed from the message queue and in block360 the merged form of the message can be added to the message queue. Ifthe latter, in block 350 the located associated message can be updatedwith the merged data and in block 365 the process can end.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, or semiconductor system, apparatus,or device, or any suitable combination of the foregoing. More specificexamples (a non-exhaustive list) of the computer readable storage mediumwould include the following: an electrical connection having one or morewires, a portable computer diskette, a hard disk, a random access memory(RAM), a read-only memory (ROM), an erasable programmable read-onlymemory (EPROM or Flash memory), an optical fiber, a portable compactdisc read-only memory (CD-ROM), an optical storage device, a magneticstorage device, or any suitable combination of the foregoing. In thecontext of this document, a computer readable storage medium may be anytangible medium that can contain, or store a program for use by or inconnection with an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radiofrequency, and the like, or anysuitable combination of the foregoing. Computer program code forcarrying out operations for aspects of the present invention may bewritten in any combination of one or more programming languages,including an object oriented programming language and conventionalprocedural programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been described above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. In this regard, the flowchart and blockdiagrams in the Figures illustrate the architecture, functionality, andoperation of possible implementations of systems, methods and computerprogram products according to various embodiments of the presentinvention. For instance, each block in the flowchart or block diagramsmay represent a module, segment, or portion of code, which comprises oneor more executable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

It also will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Finally, the terminology used herein is for the purpose of describingparticular embodiments only and is not intended to be limiting of theinvention. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Having thus described the invention of the present application in detailand by reference to embodiments thereof, it will be apparent thatmodifications and variations are possible without departing from thescope of the invention defined in the appended claims as follows:

1. A method for message merging in a messaging queue, the methodcomprising: receiving a request to add a new message to a message queuein a message queue manager executing in memory by a processor of a hostcomputing platform; identifying an association key associating the newmessage with an existing message in the message queue; locating anassociated message in the message corresponding to the identifiedassociation key; and, merging the new message with the locatedassociated message in the message queue.
 2. The method of claim 1,further comprising: determining if a merge indicator is specified forthe received request; performing the identifying, locating and mergingonly if the merge indicator is specified for the received request; and,otherwise storing the new message on the message queue withoutperforming the identifying, locating and merging if the merge indicatoris not specified for the received request.
 3. The method of claim 1,wherein merging the new message with the located associated message inthe message queue, comprises: loading a merge rule for the new messageand the located associated message; applying the merge rule to data ineach of the new message and the located associated message to producemerged data; and, updating the located associated message in the messagequeue with the merged data while discarding the new message.
 4. Themethod of claim 1, wherein merging the new message with the locatedassociated message in the message queue, comprises: loading a merge rulefor the new message and the located associated message; applying themerge rule to data in each of the new message and the located associatedmessage to produce merged data; and, updating the new message, storingthe new message in the message queue and removing the located associatedmessage from the message queue.
 5. A message queueing data processingsystem comprising: a host computing platform comprising memory and atleast one processor; a message queue coupled to the host computingplatform; a message queue manager coupled to the message queue andexecuting by the processor in the memory of the host computing platform;and, a message merge module coupled to the message queue manager, themodule comprising program code enabled upon execution while in memory bya processor of a computer to identify in a request to add a new messageto the message queue received by the message queue manager, anassociation key associating the new message with an existing message inthe message queue, to locate an associated message in the message queuecorresponding to the identified association, and to merge the newmessage with the located associated message in the message queue.
 6. Thesystem of claim 5, wherein the association key is disposed in a messageheader for the new message.
 7. The system of claim 5, wherein theassociation key is disposed in a parameter to the received request. 8.The system of claim 5, wherein the association key is disposed in a bodyof the new message.
 9. The system of claim 5, wherein the associationkey is disposed as attributes of the message queue.
 10. The system ofclaim 5, wherein the association key is an environment variable.
 11. Thesystem of claim 5, wherein the association key is disposed in a file forthe message queue manager.
 12. The system of claim 5, wherein theprogram code of the message merger module further is enabled to load amerge rule for the new message and the located associated message, toapply the merge rule to data in each of the new message and the locatedassociated message to produce merged data, and to update the locatedassociated message in the message queue with the merged data whilediscarding the new message.
 13. The system of claim 5, wherein themerger rule is an executable script programmed to merge the data in eachof the new message and the located associated message.
 14. The system ofclaim 5, wherein the merger rule is an executable program programmed tomerge the data in each of the new message and the located associatedmessage.
 15. A computer program product comprising a computer usablemedium embodying computer usable program code for message merging in amessaging queue, the computer program product comprising: computerusable program code for receiving a request to add a new message to amessage queue in a message queue manager executing in memory by aprocessor of a host computing platform; computer usable program code foridentifying an association key associating the new message with anexisting message in the message queue; computer usable program code forlocating an associated message in the message corresponding to theidentified association key; and, computer usable program code formerging the new message with the located associated message in themessage queue.
 16. The computer program product of claim 15, furthercomprising: computer usable program code for determining if a mergeindicator is specified for the received request; computer usable programcode for performing the identifying, locating and merging only if themerge indicator is specified for the received request; and, computerusable program code for otherwise storing the new message on the messagequeue without performing the identifying, locating and merging if themerge indicator is not specified for the received request.
 17. Thecomputer program product of claim 15, wherein the computer usableprogram code for computer usable program code for merging the newmessage with the located associated message in the message queue,comprises: computer usable program code for loading a merge rule for thenew message and the located associated message; computer usable programcode for applying the merge rule to data in each of the new message andthe located associated message to produce merged data; and, computerusable program code for updating the located associated message in themessage queue with the merged data while discarding the new message. 18.The computer program product of claim 15, wherein the computer usableprogram code for merging the new message with the located associatedmessage in the message queue, comprises: computer usable program codefor loading a merge rule for the new message and the located associatedmessage; computer usable program code for applying the merge rule todata in each of the new message and the located associated message toproduce merged data; and, computer usable program code for updating thenew message, storing the new message in the message queue and removingthe located associated message from the message queue.